<script >

import { ref, computed, components, onMounted, $ref } from "vue"
import { useRouter, useRoute } from 'vue-router'
import one from '../components/one.vue'
export default {
    components: {
        one
    },
    setup() {
        const router = useRouter()
        const m = ref(999)
        const p = ref('mmmmm')
        const jia = () => m.value += 1;
        const mm = computed(() => m.value.toFixed(2))
        const fn = (e) => { console.log(e); p = 4444 }
        let xx = ref(null)
        onMounted(() => { console.log(xx); })
        let pppp = ()=>{
            console.log(router);
            router.push('/login')
        }
        return {
            m,
            jia,
            mm,
            p,
            fn,
            xx,
            pppp
        }
    }
}
</script>
<template>
    <div>
        <!-- {{ m }} {{mm}} <button @click="jia"> +</button> -->
        <one :p="p" @ffn="fn"></one>
        <p ref="xx">888</p>
        <div @click="pppp">跳转</div>
    </div>
</template>
    
<style scoped>

</style>
    